import React from 'react'
import { useEffect } from 'react';
import { useSelector, useDispatch } from "react-redux"
import { asynclol } from "../../store/slices/lolSlies"
import "./LoL.css"

export default function LoL() {
    let { lol } = useSelector(state => state)
    let dispatch = useDispatch()
    useEffect(() => {
        dispatch(asynclol())
    }, [])
    return (
        <ul className='lol'>
            {
                lol.value.map((item) => {
                    return <li key={item.id}>
                      
                        <img src={item.avatar} alt="" /> <br />
                        <span>{item.name}</span>

                    </li>
                })
            }


        </ul>
    )
}
